var windowName = "page";
var Page;
apiready = function(){
    onWindowShow(function () {
        console.log(windowName + " show")
    })
    onWindowHide(function () {
        console.log(windowName + " hide")
    })
    console.log("newsInfo page is OK");
    Page = createVM("#Page",{
        //页面数据
        item:[]
        , loading: true
    },{
        //页面方法
        "init":function () {
            var _this = this;
            var data = getData4Page()
            var cache = getLocData("page" + data.id)
            this.item = cache

            // loading()
            apiGet("/app/page?code=" + data.id,{id:data.id},function (res) {
                setLocData("page" + data.id,res.data)
                log(res)
                clearLoading()
                _this.item = res.data
            })
        }
    })
    Page.init()

}
